With the advent of virtualization technology, it became possible to manage a plurality of virtual machines in a single physical machine and to install and manage a distributed program in a single physical machine.
Virtual machine technology has been developed with the main focus being placed on virtual machine separation which prevents each virtual machine from influencing other virtual machines when a plurality of virtual machines coexist in a single physical machine. By using this separation technology, a distributed program requiring frequent communication is installed and managed in a plurality of virtual machines of a single physical machine. When a Transmission Control Protocol (TCP)/User Datagram Protocol (UDP)-based communication protocol is used, communication performance is significantly low, so that the performance of the distributed program is considerably poor.
FIG. 1 is a diagram hierarchically representing communication protocol processing software in a general operating system.
First, an operating system, which is an application program (socket application) 10, accesses a protocol processing stack of a kernel area using a library function 12.
In the case of a TCP/IP protocol, data is transmitted to a network device driver 22 through a TCP protocol stack 16 and an IP protocol stack 20. The network device driver 22 transmits the data to an actual network device 24, thereby completing the transmission of the data.
In a virtual machine, only the network device 24 is virtualized, and the higher layer processing procedure remains the same. It is very inefficient to pass through the entire protocol stack in order to transmit data to an adjacent virtual machine (another virtual machine managed in the same physical machine).
In order to solve this problem of communication performance, a communication technology of adopting a communication channel using shared memory between virtual machines was proposed.
As the communication technology using shared memory, a technology for intercepting a communication flow above the TCP protocol stack 16 and enabling actual communication to shared memory and a technology for intercepting a communication flow below the IP protocol stack 20 of the operating system are chiefly used.
The above-described two technologies may be applied without modifying the application program. The former technology requires a slight modification of operating system kernel code, while the latter technology requires no modification of kernel code.
From the viewpoint of performance, the former technology is significantly superior to the latter technology. The former technology has lower packet processing cost and a shorter distance between both communication ends than the latter, since communication packets does not pass through a TCP/IP stack in the former technology while the communication packets must pass through TCP/IP and UDP/IP stacks in the latter technology.
The communication channel using shared memory may be employed only when the two virtual machines at both ends are present on the same physical machine. One of the most important advantages of the use of a virtual machine is that the virtual machine can be moved to another physical machine during the execution thereof, that is, virtual machine live migration can be supported. When a shared memory communication channel is adopted, this advantage is not available.
The latter technology supports live migration by using a method for switching a virtual network interface in which method a virtual machine provides the flow of communication packets immediately before live migration. The former technology does not support live migration yet.
Of the conventional communication channel technologies, the shared memory communication channel includes two pieces of shared memory, and each piece of shared memory is configured in such a way that a single virtual machine allocates actual memory and a counter party virtual machine performs only mapping in its own address space.
The present invention is intended to propose a channel switching technique in shared memory which adopts the above-described technology.